package com.comparator.comparator1;

import java.util.Comparator;

public class SortByEmployeeSalary implements Comparator{

	@Override
	public int compare(Object obj1, Object obj2) {
		Employee e1=(Employee)obj1;
		Employee e2=(Employee)obj2;
		Double d1=e1.getSalary();
		Double d2=e2.getSalary();
		return d1.compareTo(d2);
	}

}
